# Contributor: Miguel Terron <miguel.a.terron@gmail.com>
# Maintainer: Miguel Terron <miguel.a.terron@gmail.com>
pkgname=mdnsd
pkgver=0.10
pkgrel=0
pkgdesc="Embeddable Multicast DNS Daemon"
url="https://github.com/troglobit/mdnsd"
arch="all"
license="BSD-3-Clause"
subpackages="
	$pkgname-doc
	$pkgname-libs
	$pkgname-static
	$pkgname-openrc
	"
source="
	mdnsd.confd
	mdnsd.initd
	https://github.com/troglobit/mdnsd/releases/download/v$pkgver/mdnsd-$pkgver.tar.xz
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-systemd
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="
c4ff3b6c27b4411753bea0bd63ecda31be47283c5375f81d38f351839fe15c8897001be2c8adcc7f2943179437135b482d4d629be841bc1bfb634040da823501  mdnsd.confd
8a4fb736263ec05aa439f320091a43dfea64fb7e89fd0af5ada3981d0461009f55e1ac598a143a9458063eaf117e1b7b788463f0af316153fa6bfea864019a99  mdnsd.initd
aced00adda9ce9d915cd51d74f4249ae4be1917b679f8750262b505908b70cffbec6235fdc01a14d66171607f078e2378f2d2f3cc605abc9213857232d687c93  mdnsd-0.10.tar.xz"
